package com.ls.pattern.chain.auth.optimize;

import com.ls.pattern.chain.auth.entity.Member;

/**
 * @author 挥之以墨
 */
public class OptimizeMemberService {
    public void login(String username, String password) {
        Handler<Member, Void> validateHandler = new Handler.Builder<Member, Void>()
                .addHandler(new ValidateHandler())
                .addHandler(new LoginHandler())
                .addHandler(new AuthHandler())
                .build();

        validateHandler.doHandler(new Member(username, password));
    }
}
